<template>
  <div>
      <el-input placeholder="请输入内容" v-model="input1" class="input-with-select" :ref="input1"  popper-class="my-autocomplete">
        <i slot="suffix" class="el-icon-circle-close el-input__icon" @click="onReset" v-if="input1.length?true:false"></i>
        <el-button slot="append" icon="el-icon-search" @click="onSearch"></el-button>
      </el-input>
  </div>
</template>

<script>
export default {
  data(){
    return{
      input1:'',
      userList:[]
    }
  },
  methods:{
    async onSearch(){
      this.$emit('onSearch',this.input1)
    },
    onReset() {
      this.$emit('onReset')
      this.input1=''
    }
  }
}
</script>

<style lang="less" scoped>
/deep/.input-with-select{
  width: 33.3%;
  margin-right: 15px;
}
.el-select .el-input {
  width: 130px;
}

.input-with-select .el-input-group__prepend {
  background-color: #fff;
  margin-right: 10px;
}
</style>